<template>
	<view v-if="loadding">
		<view class="head">
			<text class="head-price">+{{listData.money}}</text>
			<!-- <text class="head-status">处理中</text> -->
			<text class="head-status" v-if="listData.status == 0">处理中</text>
			<text class="head-status" v-if="listData.status == 1">交易成功</text>
			<text class="head-status" v-if="listData.status == 2">交易失败</text>
		</view>
		<view class="cnetent">
			<view class="item">
				<text>提现方式</text>
				<!-- <text class="item-content">银行卡</text> -->
				<text class="item-content" v-if="listData.type==1">微信</text>
				<text class="item-content" v-if="listData.type==2">支付宝</text>
				<text class="item-content" v-if="listData.type==3">银行卡</text>
			</view>
			<view class="item">
				<text>账户</text>
				<text class="item-content">{{listData.bank_number}}</text>
			</view>
			<!-- <view class="item">
				<text>订单号</text>
				<text class="item-content">11111111</text>
			</view> -->
			<view class="item">
				<text>时间</text>
				<text class="item-content">{{listData.create_time}}</text>
			</view>
			<view class="item">
				<text>描述</text>
				<text class="item-content" v-if="listData.descrip ==null">无</text>
				<text class="item-content" v-else>{{listData.descrip}}</text>
			</view>
			<view class="item">
				<text>管理员备注</text>
				<text class="item-content" v-if="listData.remark ==null">无</text>
				<text class="item-content" v-else>{{listData.remark}}</text>
			</view>
		</view>
		<view class="nullmsg d-c-c p30" v-if="listData.length == 0 ">
			<text class="iconfont icon-wushuju"></text>
			<text class="cont">亲，暂无相关记录哦</text>
		</view>
		<!-- <uni-load-more class="not" v-else :loadingType="loadingType"></uni-load-more> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				listData: '',
				id: '12', //id
				loadding: false,
			};
		},
		onShow() {
			this.getData();
		},
		onPullDownRefresh() {
			setTimeout(() => {
				uni.stopPullDownRefresh();
			}, 1000);

		},
		onLoad(e) {

			if (e.select == 1) {
				this.id = e.id;
				console.log(this.id);
				this.getData();
			}
			this.getData();
		},
		methods: {
			getData() {
				let self = this;
				if (self.id != '') {
					uni.showLoading({
						title: '加载中'
					});
					self._post('user.index/withdrawal_detail', {
							id: self.id
						},
						function(res) {
							//console.log(res);
							self.listData = res.data.info;
							self.loadding = true;
							uni.hideLoading();
						}
					);
				}

			},
		}
	}
</script>

<style lang="scss">
	.nullmsg {
		width: 100%;
		height: 100%;
		position: fixed;
		top: 0rpx;
		background-color: #FFFFFF;
	}

	.head {
		width: 100%;
		text-align: center;
		height: 160rpx;
		display: flex;
		flex-direction: column;
		align-items: center;
		border-top: 2rpx solid #F4F4F4;
	}

	.head-price {
		margin-top: 30rpx;
		font-size: 36rpx;
		font-weight: 800;
		margin-bottom: 3rpx;
	}

	.head-status,
	.item-content {
		color: #999999;
	}

	.cnetent .item:last-child {
		border: none;
	}

	.item {
		width: 90%;
		margin: 0 auto;
		display: flex;
		justify-content: space-between;
		border-bottom: 2rpx solid #F4F4F4;
		padding: 30rpx 20rpx;
	}

	.item-content {}
</style>
